<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    /*
     * Dont know why this was in and it fails with Zend 1.11
     */
    /*
    protected function _initAutoload()
    {
        $moduleLoader = new Zend_Application_Module_Autoloader(array(
            'namespase' => '',
            'basePath' => APPLICATION_PATH));
        $autoloader = Zend_Loader_Autoloader::getInstance();
        $autoloader->registerNamespace(array('App_'));
        return $moduleLoader;
    } */
    protected function _initViewHelpers()
    {
        $this->bootstrap('layout');
        $layout = $this->getresource('layout');
        $view = $layout->getview();
        $view->doctype('XHTML1_STRICT');
        $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');
    }
    /**
     * used for handling top-level navigation
     * @return Zend_Navigation
     */
    protected function _initNavigation()
    {
        $this->bootstrap('layout');
        $layout = $this->getResource('layout');
        $view = $layout->getView();
        $config = new Zend_Config_Xml(APPLICATION_PATH . '/configs/navigation.xml', 'nav');
        $container = new Zend_Navigation($config);
        $view->navigation($container);
//        My attempt at fixing the below ERROR / Warning
//        Strict standards: Creating default object from empty value in C:\zsite\hwpc\application\controllers\IndexController.php on line 8
//        $activeNav = new Zend_Navigation($config);
//        $view->navigation($activeNav);
    }
}

